package com.ruoyi.message.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 消息记录对象 chat_message
 * 
 * @author ruoyi
 * @date 2023-10-12
 */
public class Message extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private String id;

    /** 发送者Id */
    @Excel(name = "发送者Id")
    private String senderId;

    /** 目标Id */
    private String toId;

    /** 内容 */
    private String text;

    /** 时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 消息类型 */
    @Excel(name = "消息类型")
    private String type;

    /** 已读/未读 */
    @Excel(name = "已读/未读")
    private Long unread;

    /** 内容类型 */
    @Excel(name = "内容类型")
    private String textType;
    /** 消息内容类型 */
    @Excel(name = "发送者名字")
    private String senderName;
    /** 消息内容类型 */
    @Excel(name = "发送者头像")
    private String senderAvatar;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setSenderId(String senderId) 
    {
        this.senderId = senderId;
    }

    public String getSenderId() 
    {
        return senderId;
    }
    public void setToId(String toId) 
    {
        this.toId = toId;
    }

    public String getToId() 
    {
        return toId;
    }
    public void setText(String text) 
    {
        this.text = text;
    }

    public String getText() 
    {
        return text;
    }
    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setUnread(Long unread) 
    {
        this.unread = unread;
    }

    public Long getUnread() 
    {
        return unread;
    }
    public void setTextType(String textType) 
    {
        this.textType = textType;
    }

    public String getTextType() 
    {
        return textType;
    }

    @Override
    public String toString() {
        return "Message{" +
                "id='" + id + '\'' +
                ", senderId='" + senderId + '\'' +
                ", toId='" + toId + '\'' +
                ", text='" + text + '\'' +
                ", time=" + time +
                ", type='" + type + '\'' +
                ", unread=" + unread +
                ", textType='" + textType + '\'' +
                ", senderName='" + senderName + '\'' +
                ", senderAvatar='" + senderAvatar + '\'' +
                '}';
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderAvatar() {
        return senderAvatar;
    }

    public void setSenderAvatar(String senderAvatar) {
        this.senderAvatar = senderAvatar;
    }
}
